XMLFileName Setup Information: the first time you run
This application uses the XMLFileName property of DBWebDataSource for the
source of the data. The first time the application is run, it is necessary to set
XMLFileName property to the .xml file that comes with this application.
If an .xsd file is also used, that also must be set. To do this, select
the DBWebDataSource on the tool tray, and then open the object inspector, and
move to the XMLFileName property. Click on the ellipsis to start the File Open
dialog, and then select the .xml file in this directory.
Read-write applications using XMLFileName
require that web clients have write access to the XMLFiles they are writing to.
If the web client does not have write access, a permissions error will occur
whenever the client attempts to update the xml file. To avoid this, the
application developer needs to grant rights to the clients who will be using the
application. There are two ways to do this:
-
If UseUniqueFileName is false, then all users need to have write
rights to the file specified by the XMLFileName property. To do this:
-
In your folder options, make sure that 'Use Simple File
Sharings' is not checked.
- Using Explorer, locate the XML file being used in the
project. Right click, select properties, select the Security panel, add
your web user. If you are not sure which user is your web user, you can
add 'ASPNET', Then give Full Rights' over this file to that user.
-
If User Authentication is being used, and UseUniqueFileName is true,
then the application developer will typically want to create a users group
for the application, and to have the user xml files be created in a specific
directory off of the Web Root directory:
- In the Virtual Directory where the Web application is
built, create a new folder named 'CacheFiles' (or whatever path name you
desire).
-
Using Explorer, locate the new folder
to be used for holding the cached xml Files. Right click,
select properties, select the Security panel, add your Web User GroupName
or the User group you are allowing to access these files, or ASPNET
if you don't want to limit the users to the application, and
give Full Rights over this folder.'
(Again, 'Use Simple File Sharings' must be unchecked').
-
If the application is using a DataAdapter as the initial
source of for the data (e.g. the UserAuthenticationXMLCaching
sample) then the xml file will be created by the
application, and should not exist. Otherwise, move the base xmlFile to
this folder, and then using the Object Inspector, set the
DBWebDataSource.XMLFileName to this file.